#ifndef CARD_H
#define CARD_H

#define SUIT_COUNT 4
#define RANK_COUNT 13
#define CARD_PER_DECK SUIT_COUNT* RANK_COUNT

#include <stdbool.h>
#include <stdio.h>
#include <string.h>

struct card {
    int order, desk;
};
typedef struct card card;

int card_suit(card c);
int card_rank(card c);
card gen_card(int suit, int rank);
void card_rank_name(char* str, int rank);
void card_suit_name(char* str, int suit);
void card_name(char* str, card c);
void card_swap(card* a, card* b);

bool card_is_special(card c);
int card_need_draw(card c);
bool card_is_cancel(card c);
bool card_is_skip(card c);
bool card_is_rev(card c);

#endif
